#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Author:liang futing
#@Time :2019/4/17 14:19
import json

from django.views.generic import CreateView
from django.shortcuts import HttpResponse

from system.mixin import LoginRequiredMixin

class SimpleInfoCreateView(LoginRequiredMixin,CreateView):
    def post(self, request, *args, **kwargs):
        res=dict(result=False)
        form =self.get_form()
        if form.is_valid():
            form.save()
            res['result']=True
        return HttpResponse(json.dumps(res),content_type='application/json')

